package com.ophiux.cs.domain.chat.model.valueobj;

import com.ophiux.cs.domain.core.ValueObject;

/**
 * 聊天消息发送结果
 * @author chenh
 *
 */
public class PushChatMessageResult extends ValueObject{

	private boolean isSuccess;	//true：成功     false:失败
	
	private String message;	//结果描述
	
	private String error_code;	//错误码
	
	private String pushID;	//发送成功存在

	public PushChatMessageResult(boolean isSuccess, String message, String error_code, String pushID) {
		super();
		this.isSuccess = isSuccess;
		this.message = message;
		this.error_code = error_code;
		this.pushID = pushID;
	}

	public PushChatMessageResult(boolean isSuccess, String message, String error_code) {
		super();
		this.isSuccess = isSuccess;
		this.message = message;
		this.error_code = error_code;
	}

	public boolean isSuccess() {
		return isSuccess;
	}

	public void setSuccess(boolean isSuccess) {
		this.isSuccess = isSuccess;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getError_code() {
		return error_code;
	}

	public void setError_code(String error_code) {
		this.error_code = error_code;
	}
	
	public static PushChatMessageResult success(String _message , String _pushID) {
		return new PushChatMessageResult(true, _message, _pushID);
	} 
	
	public static PushChatMessageResult fail(String _error_code , String _message) {
		return new PushChatMessageResult(true , _message , _error_code);
	} 
	
}
